package com.xingkeduo.remote.feign;

import com.xingkeduo.dto.ActivityApiResponseVo;
import com.xingkeduo.dto.ActivityCombinationParam;
import com.xingkeduo.dto.MarketActivityDto;
import com.xingkeduo.dto.param.VerifyReedRedeemCodeParam;
import com.xingkeduo.utils.ResponseUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;


@FeignClient(value = "business-marketing")
public interface MarketingFeignService {

    //查询用户卡记录
    @RequestMapping("/mk/api/provide/getUserCardList")
    String getUserCardList(@RequestParam(value = "userCardListParam") String userCardListParam);

    //查询用户卡详情
    @RequestMapping("/mk/api/provide/getUserCardDetail")
    String getUserCardDetail(@RequestParam(value = "userCardDetailParam") String userCardDetailParam);

    //查询用户券记录
    @RequestMapping("/mk/api/provide/getUserCouponList")
    String getUserCouponList(@RequestParam(value = "userCouponListParam") String userCouponListParam);

    //查询用户券详情
    @RequestMapping("/mk/api/provide/getUserCouponDetail")
    String getUserCouponDetail(@RequestParam(value = "userCouponDetailParam") String userCouponDetailParam);

    //查询用户双12权益卡
    @RequestMapping("/mk/api/provide/getGifBagDetail")
    String getGifBagDetail(@RequestParam(value = "userCardDetailParam") String userCardDetailParam);

    @RequestMapping("/mk/api/provide/getUserActivity")
    String getUserActivity(@RequestParam(value = "activityCombinationParam") String activityCombinationParam);

    @RequestMapping("/mk/api/provide/getUserCoupon")
    String getUserCoupon(@RequestParam(value = "activityCombinationParam") String activityCombinationParam);

    @RequestMapping("/mk/api/provide/getUserCard")
    String getUserCard(@RequestParam(value = "activityCombinationParam") String activityCombinationParam);

    @RequestMapping("/mk/api/provide/queryMarketing")
    String queryMarketing(@RequestParam(value = "marketingParam") String marketingParam);

    @RequestMapping("/mk/api/discount/package/getBypassFlowActivityTime")
    ResponseUtils<Map<String, ActivityApiResponseVo>> getBypassFlowActivityTime(@RequestParam(value = "storeId") Long storeId, @RequestParam(value = "hairdresserId") Long hairdresserId
            , @RequestParam(value = "hairServiceId") Long hairServiceId, @RequestParam(value = "startDate") String startDate, @RequestParam(value = "endDate") String endDate);

    //核销接口
    @RequestMapping("/mk/api/receive/bindBagReceiveAccount")
    String bindBagReceiveAccount(@RequestParam(value = "code") String code, @RequestParam(value = "userId") Long userId);

    //插入核销数据 -- 仅限三方调用
    @RequestMapping("/mk/api/receive/verifyUserPurchaseRedeemCode")
    String verifyUserPurchaseRedeemCode(@RequestBody VerifyReedRedeemCodeParam verifyReedRedeemCodeParam);

    //领取优惠包接口 -- 仅限三方调用
    @RequestMapping("/mk/api/receive/bindUserPurchaseRedeemCode")
    String bindUserPurchaseRedeemCode(@RequestParam(value = "redeemCodeId") String redeemCodeId, @RequestParam(value = "marketingId") String marketingId);

    @RequestMapping("/mk/api/receive/queryMarketingBagByRedeemCode")
    String queryMarketingBagByRedeemCode(@RequestParam(value = "code") String code);
    //获取券详情
    @RequestMapping("/mk/api/receive/queryActivityCoupon")
	String getCouponDetail(@RequestParam(value = "marketingId") Long marketingId,@RequestParam(value = "userId") Long userId);
    //获取卡详情
    @RequestMapping("/mk/api/receive/queryActivityCard")
	String getCardDetail(@RequestParam(value = "marketingId") Long marketingId,@RequestParam(value = "userId") Long userId);
    //获取券详情
    @RequestMapping("/mk/api/receive/queryActivityCouponBag")
	String getCouponBagDetail(@RequestParam(value = "marketingBagId") Long marketingBagId,@RequestParam(value = "userId") Long userId);
    //获取门店列表
    @RequestMapping("/mk/api/coupon/getStroesList")
	String getMarketingStoreList(@RequestParam(value = "marketingId") Long marketingId,@RequestParam(value = "marketingType") Integer marketingType);
    //根据口碑商品id 查询是否可以兑换
    @RequestMapping("mk/api/receive/queryActivityCouponBagByItemId")
    String queryActivityCouponBagByItemId(@RequestParam(value = "itemId") String itemId,@RequestParam(value = "userId") Long userId);

    @RequestMapping("/mk/api/provide/bindReceiveAccount")
    String bindReceiveAccount(@RequestParam(value = "userId") Long userId, @RequestParam(value = "marketingId") Long marketingId,@RequestParam(value = "marketingType") Integer marketingType,@RequestParam(value = "sendType") Integer sendType);

    @RequestMapping("/mk/api/provide/bindBagReceiveAccount")
    String bindBagReceiveAccount(@RequestParam(value = "userId") Long userId, @RequestParam(value = "marketingBagId") Long marketingBagId);


    /**
     * 查询最优活动卡券信息
     * @param param
     * @return
     */
    @PostMapping("/mk/api/discount/package/getRecommendedPackage")
    ResponseUtils<MarketActivityDto> getRecommendedPackage(@RequestBody ActivityCombinationParam param);


    /**
    * @description: 查询用户是否有barber
    * @author: ch
    * @Param [userId, hairType]
    * @return com.xingkeduo.utils.ResponseUtils<java.lang.Boolean>
    * @date: 2019-08-01 20:25
    **/
    @RequestMapping("/mk/api/provide/checkUserHasBarberCoupon")
    ResponseUtils<Boolean> checkUserHasBarberCoupon(@RequestParam(value = "userId")  Long userId, @RequestParam(value = "hairType") String hairType);

}
